<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/Public/foundation/foundation.min.css">
    <script src="/Public/foundation/foundation.min.js"></script>
    <script src="/Public/foundation/modernizr.js"></script>
    <script src="/Public/jquery.min.js"></script>
    <link rel="stylesheet" href="http://static.runoob.com/assets/foundation-icons/foundation-icons.css">
</head>
<body>
<nav class="top-bar" data-topbar>
    <ul class="title-area">
        <li class="name">
            <h1><a href="#">后台管理</a></h1>
        </li>
    </ul>
    <section class="top-bar-section">
        <ul class="right">
            <?php if($_SESSION['uname']== null): ?><li><a href="<?php echo U('login');?>">登录</a></li>
                <?php else: ?>
                <li><a href="">欢迎<?php echo (session('uname')); ?></a></li>
                <li><a href="<?php echo U('loginout');?>">退出</a></li><?php endif; ?>
        </ul>

    </section>
</nav>
<div>
    <div class="small-2 columns">
        <ul class="side-nav">
            <li><a href="<?php echo U('showUsers');?>">管理员管理</a></li>
            <li><a href="<?php echo U('showfront');?>">用户管理</a></li>
            <li><a href="#">Link 3</a></li>
            <li><a href="#">Link 4</a></li>
        </ul>
    </div>
    <div class="small-10 columns">
        
    <div class="responsive">
        <table>
            <thead>
            <a style="text-align:right" href="<?php echo U('addUser');?>"><i class="fi-heart"> </i>添加管理员</astyle>
            <tr>
                <th>用户编号</th>
                <th>用户名</th>
                <th>昵称</th>
                <th>手机号</th>
                <th style="text-align:center">邮箱</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <?php if(is_array($user)): foreach($user as $key=>$v): ?><tr >
                    <td style="text-align:center"><?php echo ($v["uid"]); ?></td>
                    <td><?php echo ($v["uname"]); ?></td>
                    <td><?php echo ($v["uni"]); ?></td>
                    <td><?php echo ($v["tel"]); ?></td>
                    <td><?php echo ($v["email"]); ?></td>
                    <td>
                        <a href="<?php echo U('delUser');?>?uid=<?php echo ($v['uid']); ?>"><i class="fi-x"></i>删除</a>
                        <a href="<?php echo U('editUser');?>?uid=<?php echo ($v['uid']); ?>"><i class="fi-wrench"></i>修改</a>
                    </td>
                </tr><?php endforeach; endif; ?>
            </tbody>
        </table>
    </div>


    </div>
</div>
</body>
</html>